home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cpptut22 / car.cpp < prev    next >
C/C++ Source or Header  |  1992-01-19  |  366b  |  24 lines

  1.                                   // Chapter 7 - Program 5
  2. #include "car.h"
  3.  
  4.  
  5. void car::initialize(int in_wheels, float in_weight, int people)
  6. {
  7.    passenger_load = people;
  8.    wheels = in_wheels;
  9.    weight = in_weight;
  10. }
  11.  
  12.  
  13. int car::passengers(void)
  14. {
  15.    return passenger_load;
  16. }
  17.  
  18.  
  19.  
  20.  
  21. // Result of execution
  22. //
  23. // (this file cannot be executed)
  24.